GPIOReadPin block

Short summary

Name

GPIOReadPin

→POU type

→function

Category

more system blocks, Blocks for GPIOs, block with internal error diagnostic

Graphical interface

Available since

version 1.85.0 (for Neuron Power Engineer) and version 3.5.2 of Neuron RTS max
(warning) This block is supported for →phyBOARD-Regor.

Functionality

The block reads the value of a GPIO pin.

Inputs, outputs

 

Identifier

→Data type

Description

Inputs:

port

USINT

0-based port index of the addressed GPIO

pin

USINT

0-based pin index of the addressed GPIO

Output:

pinValue

BOOL

the actual value of the input pin

TRUE: pin is active

FALSE: pin is passive

Return value:

UDINT

the return code of the operation

0: OK

1: common error

3: System service not loaded

Input EN and output ENO are available when →calling the block. See "Execution control: EN, ENO" for information on input EN and output ENO.

See:

Internal error diagnostic for block

The block checks the following error cases and – if they occur – the block sets the output ENO of the block to the value FALSE (or an equivalent): The return code of the block is not 0 (see above).

Example for usage within ST-editor

At present, there is no example.